package cn.com.surker.control.service.impl;

import cn.com.surker.control.entity.ControlExpendBatch;
import cn.com.surker.control.service.ErpControlExpendBatchService;
import cn.com.surker.util.StringUtils;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 工控机自主生产发货信息 服务实现类
 * </p>
 *
 * @author admin
 * @since 2025-01-06
 */
@Service
public class ErpControlExpendBatchImpl extends ControlExpendBatchBaseImpl implements ErpControlExpendBatchService {

	@Override
	public ControlExpendBatch queryByConNo(String batchNo) {
		if (StringUtils.isBlank(batchNo)) {
			return null;
		}
		QueryWrapper<ControlExpendBatch> qw = new QueryWrapper<>();
		qw.eq("con_batch_no", batchNo);
		qw.last("limit 1");
		ControlExpendBatch expendBatch = controlExpendBatchDao.selectOne(qw);
		return expendBatch;
	}
}